j-qq<div class="bg-white">
	<header class="mui-bar mui-bar-nav login-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href='@Url.Action("Index","Home")'></a>
		<h1 class="mui-title">登录</h1>
	</header>
	<!--DOM -->
	<div class="mui-content bg-white">
		<!---->
		<img src="/images/logo.png" class="logo" alt="" />
		<br />
		<br />
		<div class="mui-content-padded login-form-box">
			<div class="mui-input-row">
				<input type="text" class="mui-input-clear j-mobile" placeholder="请输入手机号" />
			</div>
			<div class="mui-input-row">
				<input type="password" class="mui-input-clear j-pwd" placeholder="请输入密码" />
			</div>
		</div>
		<br /><br />
		<!---->
		<button class="mui-btn mui-btn-block mui-btn-green logout-btn link-href" data-href='index.html'>登录</button>
		<br />
		<p class="mui-text-center login-text-p">
			<a class="link-href" href='@Url.Action("Register")'>立即注册</a>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;丨&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<a class="link-href" href='@Url.Action("ForGetPwd")'>忘记密码</a>
		</p>
		<br />
		<br />
		<div class="mui-text-center other-login-header"><span>其他方式登录</span></div>
		<div class="other-login-body">
			<a href="javascript:;" class="login-btn-item j-wechat">
				<img src="/images/icon-login-weChat.png" alt="" />
			</a>
			<a href="javascript:;" class="login-btn-item j-qq">
				<img src="/images/icon-login-qq.png" alt="" />
			</a>
		</div>
		<!---->
	</div>
</div>
@section Scripts{
    <script>


	layui.use(['form', 'layer', 'upload'], function() {
		layer = layui.layer;
	})


	$(".mui-btn-green").click(function() {
		if ($(".j-mobile").val().length != 11) {
			layerm.open({
			content: '请输入正确的手机号'
			,btn: '确定'
			});

			return false;
		}
		if ($(".j-pwd").val().length < 6) {
			layerm.open({
			content: '请检查输入的密码'
			,btn: '确定'
			});
			return false;
		}
		$.ajax({
			type: "post",
			url: '@Url.Action("AjaxLogin")',
			data: {
				mobile: $(".j-mobile").val(),
				pwd: $(".j-pwd").val()
			},
			success: function(result) {
				if (result.state == "ok") {
					location.href = '@Url.Action("Index","Home")';
				}else{
        layerm.open({
            content: result.msg
            ,btn: '确定'
            });
                }
			}
		})
	});

	$(".j-wechat").click(function(){
		//通过 function 回调
		jsBridge.wxLogin(function(succ, obj) {
			if (succ) {
				//obj 是个 json 对象，如
				// {
				//    code:         "qqqqqqqqqqqqqqq",
				//    openid:       "wwwwwwwwwwwwwww",
				//    access_token: "aaaaaaaaaaaaaaa",
				//    userinfo: {
				//      nickname: "sssssss"
				//      //...
				//    }
				// }
				//

				$.ajax({
					type: "post",
					url: '@Url.Action("WeChat")',
					data: {
						openId: obj.openid,
						userName: obj.userinfo.nickname,
						head: obj.userinfo.headimgurl
					},
					success: function(result) {
						if (result.state == "ok") {
							location.href = '@Url.Action("Index","Home")';
						}
					}
				})
			}
		});
	})

	$(".j-qq").click(function () {
        aler("暂不可用")
		//通过 function 回调
		@*jsBridge.qqLogin(function(succ, obj) {
			if (succ) {
				//obj 是个 json 对象，如
				// {
				//    openid:       "wwwwwwwwwwwwwww",
				//    access_token: "aaaaaaaaaaaaaaa",
				//    userinfo: {
				//      nickname: "sssssss"
				//      //...
				//    }
				// }
				//
				alert(JSON.stringify(obj) + "修改头像地址");

				$.ajax({
					type: "post",
					url: '@Url.Action("QQ")',
					data: {
						openId: obj.openid,
						userName: obj.userinfo.nickname,
						head: obj.userinfo.nickname
					},
					success: function(result) {
						if (result.state = "ok") {
							location.href = '@Url.Action("Index ","Home")';
						}
					}
				})
			}
		});*@

	})
    </script>
}
